package com.betterjr.modules.bank.entity;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.betterjr.common.annotation.MetaData;
import com.betterjr.common.entity.BetterjrEntity;

@Access(AccessType.FIELD)
@Entity
@Table(name = "t_bank_property")
public class BankProperty implements BetterjrEntity {

    /** 
     * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
     */
    private static final long serialVersionUID = -7544655291083148989L;

    /**
     * 银行属性编号
     */
    @Column(name = "BANK_TYPE", columnDefinition = "VARCHAR")
    @MetaData(value = "银行属性编号", comments = "银行属性编号")
    private String bankNo;

    /**
     * 银行属性名称
     */
    @Column(name = "TYPE_NAME", columnDefinition = "VARCHAR")
    @MetaData(value = "银行属性名称", comments = "银行属性名称")
    private String bankName;
    /**
     * 
     */
    @Column(name = "CHARGE_RATE", columnDefinition = "DECIMAL")
    @MetaData(value = "", comments = "")
    private String chargeRate;

    /**
     * 
     */
    @Column(name = "RMK", columnDefinition = "VARCHAR")
    @MetaData(value = "", comments = "")
    private String rmk;

    /**
     * 是否有效：1有效，0 无效
     */
    @Column(name = "VALID_SIGN", columnDefinition = "VARCHAR")
    @MetaData(value = "银行属性编号", comments = "银行属性编号")
    private String validSign;

    /**
     * 对应的联行号前缀
     */
    @Column(name = "BANK_PREFIX", columnDefinition = "VARCHAR")
    @MetaData(value = "", comments = "")
    private String bankPerfix;

    /**
     * 
     */
    @Column(name = "TYPE_ID", columnDefinition = "DECIMAL")
    @MetaData(value = "", comments = "")
    private String propertyId;

    /**
     *
     */
    @Column(name = "NETCORP_CODE", columnDefinition = "VARCHAR")
    @MetaData(value = "银行属性编号", comments = "银行属性编号")
    private String netcorpCode;

    /**
     * 
     */
    @Column(name = "FINA_CORP", columnDefinition = "VARCHAR")
    @MetaData(value = "", comments = "")
    private String finaCorp;

    /**
     * 
     */
    @Column(name = "BBT_LEVEL", columnDefinition = "VARCHAR")
    @MetaData(value = "银行属性编号", comments = "")
    private String bbtLevel;

    public String getBankNo() {
        return bankNo;
    }

    public void setBankNo(String anBankNo) {
        bankNo = anBankNo;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String anBankName) {
        bankName = anBankName;
    }

    public String getChargeRate() {
        return chargeRate;
    }

    public void setChargeRate(String anChargeRate) {
        chargeRate = anChargeRate;
    }

    public String getRmk() {
        return rmk;
    }

    public void setRmk(String anRmk) {
        rmk = anRmk;
    }

    public String getValidSign() {
        return validSign;
    }

    public void setValidSign(String anValidSign) {
        validSign = anValidSign;
    }

    public String getBankPerfix() {
        return bankPerfix;
    }

    public void setBankPerfix(String anBankPerfix) {
        bankPerfix = anBankPerfix;
    }

    public String getPropertyId() {
        return propertyId;
    }

    public void setPropertyId(String anPropertyId) {
        propertyId = anPropertyId;
    }

    public String getNetcorpCode() {
        return netcorpCode;
    }

    public void setNetcorpCode(String anNetcorpCode) {
        netcorpCode = anNetcorpCode;
    }

    public String getFinaCorp() {
        return finaCorp;
    }

    public void setFinaCorp(String anFinaCorp) {
        finaCorp = anFinaCorp;
    }

    public String getBbtLevel() {
        return bbtLevel;
    }

    public void setBbtLevel(String anBbtLevel) {
        bbtLevel = anBbtLevel;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (bankName == null ? 0 : bankName.hashCode());
        result = prime * result + (bankNo == null ? 0 : bankNo.hashCode());
        result = prime * result + (bankPerfix == null ? 0 : bankPerfix.hashCode());
        result = prime * result + (bbtLevel == null ? 0 : bbtLevel.hashCode());
        result = prime * result + (chargeRate == null ? 0 : chargeRate.hashCode());
        result = prime * result + (finaCorp == null ? 0 : finaCorp.hashCode());
        result = prime * result + (netcorpCode == null ? 0 : netcorpCode.hashCode());
        result = prime * result + (propertyId == null ? 0 : propertyId.hashCode());
        result = prime * result + (rmk == null ? 0 : rmk.hashCode());
        result = prime * result + (validSign == null ? 0 : validSign.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;
        if (getClass() != obj.getClass()) return false;
        final BankProperty other = (BankProperty) obj;
        if (bankName == null) {
            if (other.bankName != null) return false;
        } else if (!bankName.equals(other.bankName)) return false;
        if (bankNo == null) {
            if (other.bankNo != null) return false;
        } else if (!bankNo.equals(other.bankNo)) return false;
        if (bankPerfix == null) {
            if (other.bankPerfix != null) return false;
        } else if (!bankPerfix.equals(other.bankPerfix)) return false;
        if (bbtLevel == null) {
            if (other.bbtLevel != null) return false;
        } else if (!bbtLevel.equals(other.bbtLevel)) return false;
        if (chargeRate == null) {
            if (other.chargeRate != null) return false;
        } else if (!chargeRate.equals(other.chargeRate)) return false;
        if (finaCorp == null) {
            if (other.finaCorp != null) return false;
        } else if (!finaCorp.equals(other.finaCorp)) return false;
        if (netcorpCode == null) {
            if (other.netcorpCode != null) return false;
        } else if (!netcorpCode.equals(other.netcorpCode)) return false;
        if (propertyId == null) {
            if (other.propertyId != null) return false;
        } else if (!propertyId.equals(other.propertyId)) return false;
        if (rmk == null) {
            if (other.rmk != null) return false;
        } else if (!rmk.equals(other.rmk)) return false;
        if (validSign == null) {
            if (other.validSign != null) return false;
        } else if (!validSign.equals(other.validSign)) return false;
        return true;
    }

    @Override
    public String toString() {
        return "BankProperty [bankNo=" + bankNo + ", bankName=" + bankName + ", chargeRate=" + chargeRate + ", rmk="
                + rmk + ", validSign=" + validSign + ", bankPerfix=" + bankPerfix + ", propertyId=" + propertyId
                + ", netcorpCode=" + netcorpCode + ", finaCorp=" + finaCorp + ", bbtLevel=" + bbtLevel + "]";
    }

}
